package cn.kgc.tangcco.config;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author 李昊哲
 * @Description
 * @create 2020/10/15 下午4:44
 */
@WebServlet(urlPatterns = "/config01",loadOnStartup = 1)
public class ServletConfig01 extends HttpServlet {
    private static final long serialVersionUID = -8513744830905142574L;

    public ServletConfig01() {
        System.out.println("config01天之骄子");
    }

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("config01爱的轰轰烈烈");
    }

    @Override
    public void destroy() {
        System.out.println("config01挥一挥衣袖不带走一片云彩");
    }

    @Override
    public void init(ServletConfig config) throws ServletException {
        System.out.println("config01轻轻的我来了config");
    }

    @Override
    public void init() throws ServletException {
        System.out.println("config01轻轻的我来了init");
    }
}
